import request from '@/utils/request'
import { baseApi } from '@/config/env.production'

// 统计
export function apiCountByDay(data) {
  let url = '/com/ai_count_by_day/'
  if (process.env.NODE_ENV !== 'development' && baseApi === 'https://feijiu-recycle.feijiu.com.cn/') {
    url = '/point/ai_count_by_day/'
  }
  return request({
    url,
    method: 'post',
    data,
  })
}

// 大屏数据
// 左侧
export function getIndexLeftData(data) {
  return request({
    url: '/com/index_left_count/',
    method: 'post',
    data,
  })
}
// 右侧
export function getIndexRightData(data) {
  return request({
    url: '/com/index_right_count/',
    method: 'post',
    data,
  })
}
// 中间
export function getIndexMiddleData(data) {
  return request({
    url: '/com/index_middle_count/',
    method: 'post',
    data,
  })
}

// 废旧用户活跃统计-曲线图
export function apiMemberCurve(data) {
  return request({
    url: '/member/curve/',
    method: 'post',
    data,
  })
}
// 废旧用户活跃统计-左侧分类
export function apiMemberLeftCls(data) {
  return request({
    url: '/member/left_cls/',
    method: 'post',
    data,
  })
}
